  <div class="modal" id="deletePage">
    <div class="modal-dialog">
      <div class="modal-content">

      <form role="form" id="delete-page-form" onsubmit="return false;">

        <div class="modal-header {% if page.isDeleted() %}bg-danger{% else %}bg-primary{% endif %}">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
          <div class="modal-title">
            {% if page.isDeleted() %}
            <i class="icon-fw icon-fire"></i> {{ t('modal_delete.delete_completely') }}
            {% else %}
            <i class="icon-fw icon-trash"></i> {{ t('modal_delete.delete_page') }}
            {% endif %}
          </div>
        </div>
        <div class="modal-body">
          <div class="form-group">
            <label for="">{{ t('modal_delete.deleting_page') }}:</label><br>
            <code>{{ page.path }}</code>
          </div>

          <hr>

          {% if page.grant != 2 %}
          <div class="checkbox checkbox-warning">
            <input name="recursively" id="cbDeleteRecursively" value="1" type="checkbox" checked>
            <label for="cbDeleteRecursively">
              {{ t('modal_delete.delete_recursively') }}
              <p class="help-block mt-0"> {{ t('modal_delete.recursively', page.path) }}</p>
            </label>
          </div>
          {% endif %}
          {% if not page.isDeleted() %}
          <div class="checkbox checkbox-danger">
            <input name="completely" id="cbDeleteCompletely" {% if !user.canDeleteCompletely(page.creator._id) %} disabled="disabled" {% endif %} value="1"  type="checkbox">
            <label for="cbDeleteCompletely" class="text-danger">
              {{ t('modal_delete.delete_completely') }}
              <p class="help-block mt-0"> {{ t('modal_delete.completely') }}</p>
            </label>
            {% if !user.canDeleteCompletely(page.creator._id) %}
              <p class="alert alert-warning p-2 my-0"><i class="icon-ban icon-fw" ></i>{{ t('modal_delete.delete_completely_restriction') }}</p>
            {% endif %}
          </div>
          {% endif %}
        </div>
        <div class="modal-footer">
          <div class="d-flex justify-content-between">
            {% include '../widget/modal/page-api-error-messages.html' %}
            <div>
              <input type="hidden" name="_csrf" value="{{ csrf() }}">
              <input type="hidden" name="path" value="{{ page.path }}">
              <input type="hidden" name="page_id" value="{{ page._id.toString() }}">
              <input type="hidden" name="revision_id" value="{{ page.revision._id.toString() }}">
              {% if page.isDeleted() %}
                <input type="hidden" name="completely" value="true">
                <button type="submit" class="m-l-10 btn btn-danger delete-button">
                  <i class="icon-fire" aria-hidden="true"></i>
                  {{ t('delete_completely') }}
                </button>
              {% else %}
                <button type="submit" class="m-l-10 btn btn-primary delete-button">
                  <i class="icon-trash" aria-hidden="true"></i>
                  {{ t('Delete') }}
                </button>
              {% endif %}
            </div>
          </div>
        </div><!-- /.modal-footer -->

      </form>
      </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
  </div><!-- /.modal -->
